Class
ContextError<E>
class ContextError<E> where E: Error
Module: System
Assembly: System.Runtime.dll
Source file: Error.rvn
Inheritance: Object → ContextError<E>
Implements: Error
Adds operation context while retaining the original typed failure. This is an ordinary reference object: diagnostic snapshots do not define value equality.
Constructors
2 items
ContextError(message: string, cause: E, captureStackTrace: bool)
Adds context with an explicit per-call override of the application capture setting. Capture records the attachment site only when the cause chain has no existing trace.
ContextError(message: string, cause: E)
Adds context using the application stack-capture setting, which defaults to disabled.
Properties
3 items
Cause: E
The original failure with its concrete type preserved.
Message: string
Describes the operation at this boundary without duplicating the cause's message.
Implements Error.Message
StackTrace: Optional<StackTrace>
The retained snapshot, or None when no capture was requested or supplied.
Implements Error.StackTrace
Methods
7 items
Equals(other: object?) -> bool
Tests reference identity by default; an ordinary class may override equality.
Inherited from Object.Equals
Extension member:
FormatError() -> string
Formats up to 64 error layers and one existing trace; never captures a stack. A longer or cyclic chain ends with a truncation marker. Messages are not machine codes.
Extension from ErrorFormattingExtensions.FormatError
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
ToString() -> string
Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override.
Inherited from Object.ToString
Extension member:
WithContext(message: string, captureStackTrace: bool) -> ContextError<ContextError<E>>
Adds context, optionally capturing once at this boundary when no cause trace exists.
Extension from ErrorExtensions.WithContext
Extension member:
WithContext(message: string) -> ContextError<ContextError<E>>
Adds context using the application capture setting (disabled by default).
Extension from ErrorExtensions.WithContext